# Replication Data for: The Effects of Group Composition and Dynamics on Collective Performance

This repository contains the data and code necessary to replicate the results reported in "The Effects of Group Composition and Dynamics on Collective Performance". For "plug-and-play" running of the notebooks, please ensure that all files are in the same directory.

* __Data:__ `rounds_data_phase2_processed.pkl`, `rounds_data_phase1_raw.csv`, `task_specs.json`, and `players.csv` are taken from [Replication Data for: Task Complexity Moderates Group Synergy](https://doi.org/10.7910/DVN/RP2OCY). 

* __Code:__
    * __Utilities:__ `csop_helper.py`, `csop2_helper.py`, and `csop_pctile.py` contain utilities to help process and visualize data, and are imported by various notebooks in the repository\\
    
    * __Data processing:__
        * `within_sample_preprocessing.ipynb` generates `phase_2_within_sample_processed` files (in both .pkl and .csv)\\
        
        * `phase_1_preprocessing.ipynb` generates `phase_1_processed.pkl` 
        
        * `oos_preprocessing.ipynb` generates `prediction_features.pkl` 
        
    * __Data analysis and visualization:__
        * `figures.ipynb` generates the figures shown in the main and supplementary texts 
        
        * `statistical_analyses.Rmd` generates the regression tables shown in the supplementary text 
        
        * `adhoc_analyses.ipynb` contains various summary statistics referred to throughout the main and supplementary text 
        
        
For any challenges in using this repository, please feel free to reach out to Mohammed Alsobay (mosobay@mit.edu). 